package com.dhecp.core.layui;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.List;
import java.util.Map;

/**
 * @author layui树形数据实体 - 含选择框
 *
 */
public class TreeSelectDataModel{

	private String parentId;  // 节点PID
	private String id;        // 节点ID
	private String title;     // 节点标题
	private String vtype;     // 节点类型
	private String orgid;     //组织机构编码（组织机构树中使用）
	private String cid;       //组织机构所属公司（组织机构树中使用）
	private String orgPath;   //组织机构子公司部门路径（组织机构树中使用）
	private String orgPathAll;//组织机构全部门路径（组织机构树中使用）
	private Map<String,String> checkArr;  //复选框类型
	private int levels;       //当前层级
	private int maxlevels;    //最大层级
	private boolean spread = false;   // 节点是否初始展开
	private boolean checked = false;  // 节点是否初始为选中状态
	private boolean disabled = false; // 节点是否为禁用状态
	private JSONObject attributes;
	private List<TreeSelectDataModel> children;

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getVtype() {
		return vtype;
	}

	public void setVtype(String vtype) {
		this.vtype = vtype;
	}

	public String getOrgid() {
		return orgid;
	}

	public void setOrgid(String orgid) {
		this.orgid = orgid;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public String getOrgPath() {
		return orgPath;
	}

	public void setOrgPath(String orgPath) {
		this.orgPath = orgPath;
	}

	public String getOrgPathAll() {
		return orgPathAll;
	}

	public void setOrgPathAll(String orgPathAll) {
		this.orgPathAll = orgPathAll;
	}

	public Map<String, String> getCheckArr() {
		return checkArr;
	}

	public void setCheckArr(Map<String, String> checkArr) {
		this.checkArr = checkArr;
	}

	public int getLevels() {
		return levels;
	}

	public void setLevels(int levels) {
		this.levels = levels;
	}

	public int getMaxlevels() {
		return maxlevels;
	}

	public void setMaxlevels(int maxlevels) {
		this.maxlevels = maxlevels;
	}

	public boolean isSpread() {
		return spread;
	}

	public void setSpread(boolean spread) {
		this.spread = spread;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

	public JSONObject getAttributes() {
		return attributes;
	}

	public void setAttributes(JSONObject attributes) {
		this.attributes = attributes;
	}

	public List<TreeSelectDataModel> getChildren() {
		return children;
	}

	public void setChildren(List<TreeSelectDataModel> children) {
		this.children = children;
	}

	public String toJSONString() {
		return JSON.toJSONString(this);
	}
}
